package com.jule.teenpatti.mail.network.protocol.reqs;

import JoloProtobuf.AuthSvr.JoloAuth;

import com.jule.teenpatti.mail.network.protocol.ClientReq;
import io.netty.buffer.ByteBuf;
import lombok.extern.slf4j.Slf4j;


@Slf4j
public class JoloCommon_LoginReq_600001 extends ClientReq {

    private byte[] blob;

    public JoloCommon_LoginReq_600001(int functionId) {
        super(functionId);
    }

    private JoloAuth.JoloCommon_LoginReq req;

    @Override
    public void readPayLoadImpl(ByteBuf buf) throws Exception {
        blob = new byte[buf.readableBytes()];
        buf.readBytes(blob);
        req = JoloAuth.JoloCommon_LoginReq.parseFrom(blob);
    }

    @Override
    public void processImpl() throws Exception {
        log.debug("收到消息-> " + functionId + ", reqNum-> " + header.reqNum + ", req->" + req.toString());

        try {
            //加载邮件
            //String userId = "" + header.channelId;
            //log.info("LoginReq userId:" + userId);
            //MailService.getInstance().loadMailByUserId(userId);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
    }


}
